<div class="app-content-body ">    
    <div class="bg-light lter b-b wrapper-md hidden-print">
      <h1 class="m-n font-thin h3">修改密码</h1>
    </div>
    <div class="vip-info dx-viewport demo-container">
    	<form class="my-form" id="form-container"  action="" method="">
	    	<div class="row form_row">
	    		<div id="modify_pwd" class="col-xs-12 col-sm-10 col-md-8 col-lg-6"></div>
	    	</div>          
    		<div class="row form_row">
    			<div class="padding">
					<div class="col-xs-12 col-sm-10 col-md-8 col-lg-6 text-right">
	    				<div id="save" class="vipcert_save"></div>
	    			</div>
    			</div>
    		</div>
    	</form>
    </div>
</div>
<script>
	$(function(){
		var formData = {
		    "newpassword": ""  
		};
		var formWidget = $("#modify_pwd").dxForm({
		 	formData: formData,
			readOnly: false,
			validationGroup: "customerData",
			items:[{
				itemType: "group",
	            items: [{
	                dataField: "uname",
	                label: {text: '会员姓名'},
	                validationRules: [{
	                    type: "required",
	                    message: "请输入会员姓名"
	                }]
	            },{
			        itemType: "group",
			        items: [{
			            dataField: "nickname",
			            label: {text: '会员昵称'},
			            validationRules: [{
			                type: "required",
			                message: "请输入会员昵称"
			            }]
			        }]
				},{
			        itemType: "group",
			        items: [{
			            dataField: "oldpassword",
			            label: {text: '会员原密码'},
			            editorOptions: {
		                    mode: "password"
		                },
			            validationRules: [{
			                type: "required",
			                message: "请输入会员原密码"
			            }]
			        }]
				},{
			        itemType: "group",
			        items: [{
			            dataField: "newpassword",
			            label: {text: '会员新密码'},
			            editorOptions: {
		                    mode: "password"
		                },
			            validationRules: [{
			                type: "required",
			                message: "请输入会员新密码"
			            }]
			        },{
			        	dataField: "okpassword",
		                label: {text: "确认新密码"},
		                editorType: "dxTextBox",
		                editorOptions: {
		                    mode: "password"
		                },
		                validationRules: [{
		                    type: "required",
		                    message: "请输入确认新密码"
		                }, {
		                    type: "compare",
		                    message: "确认密码与新密码不一致",
		                    comparisonTarget: function() {
		                        return formWidget.option("formData").newpassword;
		                    }
		                }]
		            }]
				}]
			}]
		}).dxForm("instance");
		
		$("#save").dxButton({
	        text: "保存",
	        type: "success",
	        useSubmitBehavior: true,
	        validationGroup: "customerData"
	    });
	})
</script>